package com.tender.controller;

import com.alibaba.fastjson.JSON;
import com.tender.domain.ConfigInfoCondition;
import com.tender.service.ConfigInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DynamicDataSourceController {

    @Autowired
    private ConfigInfoService configInfoService;

    @GetMapping("/test")
    public String test(){
        ConfigInfoCondition param = new ConfigInfoCondition();
        return JSON.toJSONString(configInfoService.selectList(param));
    }

    @GetMapping("/test/manual")
    public String testManual(){
        ConfigInfoCondition param = new ConfigInfoCondition();
        return JSON.toJSONString(configInfoService.selectListByManual(param));
    }

}
